/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.put.dcs_modeler.config;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.lang.reflect.Field;
import java.util.logging.Logger;
import org.netbeans.api.project.FileOwnerQuery;
import org.netbeans.api.project.ProjectManager;
import org.netbeans.api.project.ui.OpenProjects;
import org.netbeans.spi.project.FileOwnerQueryImplementation;
import org.openide.filesystems.FileObject;
import org.openide.filesystems.FileUtil;
import org.openide.util.Exceptions;
import org.openide.util.NbBundle;
import org.openide.xml.XMLUtil;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import org.xml.sax.InputSource;
import pl.put.dcs_modeler.config.ConfigSingleton;
import pl.put.dcs_modeler.utils.JarUtil;

/**
 *
 * @author LukaszR
 */
public class ConfigSingleton 
{
    private static Logger log =
            Logger.getLogger( ConfigSingleton.class.getName() );
    private static ConfigSingleton instance;
    //private ProjectConfiguration pc;
    //private HashMap< String, String > = new HashMap< String, String >();
    private String dataModelPath;

    public void setDataModelPath( String dataModelPath )
    {
        this.dataModelPath = dataModelPath;
    }
     
    private ConfigSingleton()
    {
        
    }
    
    private void getConfig()
    {
        Field[] fields = ProjectConfiguration.class.getFields();
        
    }
    
    private void readConfigFromFile()
    {
       
    }

    public String getDataModelPath()
    {
        return dataModelPath;
    }
    
    public static ConfigSingleton getInstance()
    {
        if ( instance == null )
        {
            instance = new ConfigSingleton();
        }
        return instance;
    }
    
    private class ProjectConfiguration
    {
        /**
         * Sciezka do pliku JAR modelu danych
         */
        private String dataModelPath;

        public String getDataModelPath()
        {
            return dataModelPath;
        }
    }
}
